/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.property.subinfo.entity;

import com.jeeplus.modules.property.buildinfo.entity.PropertyBuildinginfo;
import com.jeeplus.modules.sys.entity.User;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;

/**
 * 车位信息Entity
 * @author 陈龙
 * @version 2019-01-06
 */
public class PropertyCarinfo extends DataEntity<PropertyCarinfo> {
	
	private static final long serialVersionUID = 1L;
	private User houseowner;		// 业主名称
	private PropertyBuildinginfo buildingid;		// 楼宇名称 父类
	private String cartype;		// 汽车类型
	private String carparktype;		// 停车类型
	private Date parkstarttime;		// 停车时间起
	private Date parkendtime;		// 停车时间止
	private String carno;		// 车牌号
	
	public PropertyCarinfo() {
		super();
	}

	public PropertyCarinfo(String id){
		super(id);
	}

	public PropertyCarinfo(PropertyBuildinginfo buildingid){
		this.buildingid = buildingid;
	}

	@NotNull(message="业主名称不能为空")
	@ExcelField(title="业主名称", fieldType=User.class, value="houseowner.name", align=2, sort=7)
	public User getHouseowner() {
		return houseowner;
	}

	public void setHouseowner(User houseowner) {
		this.houseowner = houseowner;
	}
	
	@NotNull(message="楼宇名称不能为空")
	public PropertyBuildinginfo getBuildingid() {
		return buildingid;
	}

	public void setBuildingid(PropertyBuildinginfo buildingid) {
		this.buildingid = buildingid;
	}
	
	@ExcelField(title="汽车类型", dictType="car_type", align=2, sort=9)
	public String getCartype() {
		return cartype;
	}

	public void setCartype(String cartype) {
		this.cartype = cartype;
	}
	
	@ExcelField(title="停车类型", dictType="car_park_type", align=2, sort=10)
	public String getCarparktype() {
		return carparktype;
	}

	public void setCarparktype(String carparktype) {
		this.carparktype = carparktype;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="停车时间起", align=2, sort=11)
	public Date getParkstarttime() {
		return parkstarttime;
	}

	public void setParkstarttime(Date parkstarttime) {
		this.parkstarttime = parkstarttime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="停车时间止", align=2, sort=12)
	public Date getParkendtime() {
		return parkendtime;
	}

	public void setParkendtime(Date parkendtime) {
		this.parkendtime = parkendtime;
	}
	
	@ExcelField(title="车牌号", align=2, sort=13)
	public String getCarno() {
		return carno;
	}

	public void setCarno(String carno) {
		this.carno = carno;
	}
	
}